





f =open('/Users/daxiang/Downloads/6_2024_01_10.txt', encoding='utf-8')
#此时只读取了一行
pre_prod = f.readline()
gap_list = list()
#利用循环全部读出
i = 1
start = ''
end = ''
while pre_prod:
    if pre_prod.find("收到PLC拍照指令") > 0:
        start = f"{str(last_line)[0:13]}"
    elif pre_prod.find("onCaptureSucces") > 0:
        end = f"{str(last_line)[0:13]}"

    if end != '' and start != '':
        gap = int(end) - int(start)
        if gap > 0:
            gap_list.append(gap)
        # print(f"{gap}")

    last_line = pre_prod
    pre_prod = f.readline()
    i += 1

f.close()


gap_list.sort(reverse=True)
print(f"{gap_list}")